<?php
class PaymentsFForm extends BaseFormAdmin{
	public function configure(){
		$langs = SysLanguages::getAllLang();
		foreach($langs as $lang){
			$this->setWidget('name_'.$lang, new sfWidgetFormInputText(array(), array('class' => 'required hz-required')));
			$this->setValidator('name_'.$lang, new sfValidatorString(array('max_length' => 255, 'required' => false)));
			
			$this->setWidget('description_'.$lang, new sfWidgetFormTextarea());
			$this->setValidator('description_'.$lang, new sfValidatorString(array('required' => false)));
		}
		$types = Payments::getArrayTypes();
		
		$this->setWidget('type', new sfWidgetFormChoice(array('choices'=>AdminArrayData::addNoneItem($types),'expanded'=>false), array('class' => 'required hz-required')));
		$this->setValidator('type', new sfValidatorChoice(array('choices'=>array_keys($types))));
		$this->setDefault('type', '-1');
		
		parent::configure();
	}
}
